package com.bupt.smart.ui.widget;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.bupt.smart.model.RepairRequest;
import com.bupt.smart.smart.R;

/**
 * Created by ght on 16-4-20.
 */
public class CustomRepairInfoDialog extends DialogFragment {
    private static volatile CustomRepairInfoDialog dialog = null;
    private RepairRequest repairInfo;

    public static CustomRepairInfoDialog getInstance(){
        if(dialog==null){
            synchronized(CustomRepairInfoDialog.class){
                if(dialog ==null){
                    dialog = new CustomRepairInfoDialog();
                }
            }
        }
        return dialog;
    }

    public void setRepairInfo(RepairRequest repairInfo) {
        this.repairInfo = repairInfo;
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.repair_info_dialog, container,false);

        return view;
    }
}
